import 'package:json_annotation/json_annotation.dart';

part 'home_model.g.dart';


@JsonSerializable()
class HomeModel extends Object {

  List<String>? category;

  List<Products> list;

  int errcode;

  String message;

  HomeModel(this.category,this.list,this.errcode,this.message,);

  factory HomeModel.fromJson(Map<String, dynamic> srcJson) => _$HomeModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$HomeModelToJson(this);

}


@JsonSerializable()
class Products extends Object {

  int poster_id;

  String title;

  String color;

  List<Images> images;

  String create_time;

  int product_id;

  int sku_id;

  int status;

  int mode;

  int sort_order;

  String update_time;

  String category;

  Products(this.poster_id,this.title,this.color,this.images,this.create_time,this.product_id,this.sku_id,this.status,this.mode,this.sort_order,this.update_time,this.category,);

  factory Products.fromJson(Map<String, dynamic> srcJson) => _$ProductsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ProductsToJson(this);

}


@JsonSerializable()
class Images extends Object {

  int pic_id;

  String pic_url;

  String pic_name;

  String pic_thumb;

  Images(this.pic_id,this.pic_url,this.pic_name,this.pic_thumb,);

  factory Images.fromJson(Map<String, dynamic> srcJson) => _$ImagesFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ImagesToJson(this);

}


